#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int t; cin >> t;
    while (t--) {
        int n, x; cin >> n >> x;
        if (x >= 0.5 * n) cout << "YES" << '\n';
        else cout << "NO" << '\n';
    }
    return 0;
}